package com.xj.common.bussiness.device.entity;

import java.io.Serializable;

import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import static org.springframework.format.annotation.DateTimeFormat.ISO.DATE;

/**
 * <p>
 * 
 * </p>
 *
 * @author Hmemb
 * @since 2018-04-08
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_device")
public class TbDevice extends Model<TbDevice> {

    private static final long serialVersionUID = 1L;
	/**
	 * 主键id
	 */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
	 * 串号
	 */
	private String mac;
    /**
     * 设备名称
     */
		@TableField(value="device_name")
	private String deviceName;
    /**
     * 设备厂商
     */
	@TableField(value="device_firm")
	private String deviceFirm;
    /**
     * 设备型号
     */
	private String model;
    /**
     * 拥有人
     */
	private String owner;
    /**
     * 插入时间
     */
	@TableField(value="insert_time")
	@DateTimeFormat(iso = DATE)
	private Date insertTime;
    /**
     * 新增 人员1
     */
	@TableField(value="insert_person")
	private String insertPerson;
    /**
     * 修改时间
     */
	@TableField(value="update_time")
	@DateTimeFormat(iso = DATE)
	private Date updateTime;
    /**
     * 修改人
     */
	@TableField(value="update_person")
	private String updatePerson;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceFirm() {
		return deviceFirm;
	}

	public void setDeviceFirm(String deviceFirm) {
		this.deviceFirm = deviceFirm;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public Date getInsertTime() {
		return insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	public String getInsertPerson() {
		return insertPerson;
	}

	public void setInsertPerson(String insertPerson) {
		this.insertPerson = insertPerson;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdatePerson() {
		return updatePerson;
	}

	public void setUpdatePerson(String updatePerson) {
		this.updatePerson = updatePerson;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "TbDevice{" +
				"id=" + id +
				", mac='" + mac + '\'' +
				", deviceName='" + deviceName + '\'' +
				", deviceFirm='" + deviceFirm + '\'' +
				", model='" + model + '\'' +
				", owner='" + owner + '\'' +
				", insertTime=" + insertTime +
				", insertPerson='" + insertPerson + '\'' +
				", updateTime=" + updateTime +
				", updatePerson='" + updatePerson + '\'' +
				'}';
	}
}
